﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustomerDetail.aspx.cs" Inherits="Manage_basisset_CustomerDetail" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>添加客户</title>
    <link rel="stylesheet" type="text/css" href="../skin/css/base.css" />
    <script type="text/javascript">

        function checkForm() {
            var control = document.getElementById("txtname");
            var code = document.getElementById("txtcode");
            var center = document.getElementById("ddlCenter");
          
            if (control.value.length == 0) {
                alert("客户名称不能为空！");
                control.focus();
                return false;
            }
            if (code.value.length == 0) {
                alert("客户编号不能为空！");
                code.focus();
                return false;
            }
            if (center.value == 0) {
                alert("请选择所属指挥中心！");
                center.focus();
                return false;
            }
           
        }
  </script>
<style type="text/css">
.STYLE4 {
	font-size: 16px;
	color: #FF0000;
}
.STYLE5 {color: #FF0000}
.cbox{ border:none}
    .style1
    {
        width: 29%;
    }
    .style2
    {
        width: 30%;
    }
</style>
</head>
<body leftmargin="8" topmargin="8" background='../skin/images/allbg.gif'>
    <form id="form1" runat="server">
 
    <asp:ScriptManager ID="ScriptManager1" runat="server"  EnableScriptGlobalization="True" EnableScriptLocalization="True">
        </asp:ScriptManager>
    <!--  快速转换位置按钮  -->
    <table width="98%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA" align="center">
        <tr>
            <td height="26" background="../skin/images/newlinebg3.gif">
                <table width="98%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td align="center"><span style="font-size:14px; font-weight:bold">客户详细信息</span></td>
                        <td  align="right"  style="width:60px">
                        <asp:Button ID="btnreturn" CssClass="coolbg np" runat="server" Text="返回列表" onclick="btnreturn_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
<!--  内容列表   -->
    <div >
      <table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
        <tr bgcolor="#E7E7E7">
          <td height="24" colspan="5" background="../skin/images/tbg.gif"><div align="left" >
              客户基本信息</div></td>
        </tr>
       
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td width="13%" align="left"><div align="left">客户编号：<span class="STYLE5">*</span></div></td>
           <td class="style1"><div align="left">
            
              <asp:TextBox ID="txtcode" runat="server" Width="200px"></asp:TextBox>
              <asp:HiddenField ID="hdfCustomerid" runat="server" Value="0" />
            </div></td>
             <td width="13%" align="left"><div align="left">客户名称：<span class="STYLE5">*</span></div></td>
             <td class="style2"><div align="left">
            
              <asp:TextBox ID="txtname" runat="server" Width="200px"></asp:TextBox>
            </div></td>
          <td width="20%"></td>
        </tr>
       <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
          <td width="13%" align="left"><div align="left">客户所属指挥中心：<span class="STYLE5">*</span></div></td>
           <td class="style1"><div align="left">
               <asp:DropDownList ID="ddlCenter" runat="server" ></asp:DropDownList> 
            </div></td>
             <td width="13%" align="left"></td>
             <td class="style2"></td>
          <td width="20%"></td>
        </tr>
          
      </table>
        <asp:UpdatePanel id="UpdatePanelAccount" runat="server">
                    <contenttemplate>
    
      <table width="98%" border="0" align="center" style="margin-top:8px">
           <tr>

             <td>
                <table width="100%%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
        <tr bgcolor="#E7E7E7">
          <td height="24" colspan="5" background="../skin/images/tbg.gif"><div align="left" >
              客户员工列表</div></td>
        </tr>
       </table>
             </td>
           </tr>
           <tr style="background-color:#ffffff">
            <td >
        <asp:GridView ID="grdvEemp" runat="server" Width="100%" CellPadding="4" BorderColor="#D1DDAA"  
                            AutoGenerateColumns="False" AllowPaging="False" PageSize="12" 
                            DataKeyNames="EmpId"  DataMember="Name" 
                    OnRowDataBound="grdvEemp_RowDataBound" GridLines="Both" 
                    onrowcommand="grdvEemp_RowCommand">
                            <Columns>
                                <asp:TemplateField HeaderText="员工编号">
                                    <ItemTemplate>
                                       <asp:Label ID="lblcode" runat="server" Text='<%#Eval("Code") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="员工姓名">
                                    <ItemTemplate>
                                      <asp:Label ID="lblname" runat="server" Text='<%#Eval("Name") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="员工职位">
                                    <ItemTemplate>
                                      <asp:Label ID="lbljobname" runat="server" Text='<%#Eval("jobName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="线上讲师资格">
                                    <ItemTemplate>
                                      <asp:Label ID="lblIsLecturer" runat="server" Text='<%#Eval("IsLecturer") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                  <asp:TemplateField HeaderText="入职日期">
                                    <ItemTemplate>
                                      <asp:Label ID="lbljobname" runat="server" Text='<%#Eval("EntryDate") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="离职日期">
                                    <ItemTemplate>
                                      <asp:Label ID="lbljobname" runat="server" Text='<%#Eval("LeaveDate") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                 <asp:TemplateField HeaderText="操作">
                                    <ItemTemplate>
                                       <asp:LinkButton runat="server" ID="lbtEdit" CommandArgument='<%#Eval("EmpId")%>'
                                    CommandName="Edit" Text="编辑" Visible='<%#edit==1%>' ></asp:LinkButton>&nbsp;&nbsp;
                                   <asp:LinkButton runat="server" ID="lbtDelete" CommandArgument='<%#Eval("EmpId")%>'
                                    CommandName="Delete" Text="删除" Visible='<%#delete==1%>' OnClientClick="return confirm('确定要删除？')"></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <PagerSettings FirstPageText="" LastPageText="" NextPageText="" PreviousPageText="" />
                            <RowStyle Height="20px" BackColor="#FFFFFF" ForeColor="#000000" />
                            <FooterStyle BackColor="#FFFFFF" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#FCFDEE" />
                            <SelectedRowStyle BackColor="#FFFFFF" ForeColor="#000000" />
                            <PagerStyle BackColor="#FCFDEE" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#FCFDEE"  ForeColor="000000" />
                            <AlternatingRowStyle BackColor="#FCFDEE" ForeColor="#000000" />
                            
                        </asp:GridView>
                        </td>
                        </tr>
       </table>
         </contenttemplate>
                     
                    </asp:UpdatePanel>
      <!--  提交 -->
      <table width='98%'  border='0' cellpadding='1' cellspacing='1' bgcolor='#CBD8AC' align="center" style="margin-top:8px">
        <tr bgcolor='#EEF4EA'>
          <td background='skin/images/wbg.gif' align='center'><table border='0' cellpadding='0' cellspacing='0'>
              <tr>
                <td width='90' align='center'>&nbsp;</td>
                <td width='70'>&nbsp;</td>
                <td width='160'><asp:Button ID="btnsave" runat="server" Text="保存" 
                        OnClientClick="return checkForm();false" onclick="btnsave_Click" /></td>
                <td width='110'>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table>
         
    </div>
    </form>
   
</body>
</html>
